# -*- coding: utf-8 -*-
import logging
import os
import pytest
from get_project_path import project_path
from utils.zip_files import zip_files


class MainRun:

    def __init__(self,pytest_command: list) -> object:
        self.pytest_command = pytest_command
        zip_files()
        self.run()

    def run(self):
        logging.info(f"开始执行测试任务......")
        print(self.pytest_command)
        pytest.main(self.pytest_command)
        os.system(r"allure generate ./report/tmp -o ./report/html --clean")
        # os.system(f"allure serve ./report/tmp -h localhost -p 9997")
        # NoticeMain(self.case_run_list.case_run).notice_main()



